package net.zm123.sync;

import io.grpc.Server;
import io.grpc.ServerBuilder;

import java.io.IOException;

public class RpcSyncServerApp {
    public static void main(String[] args) {
        Server server = ServerBuilder.forPort(9999)
                .addService(new RpcSyncServerImpl())
                .build();
        try {
            server.start();
            server.awaitTermination();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
